<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>
        合同信息
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../../css/main.css" media="all">
    <link rel="stylesheet" href="../../../../lib/layui/css/layui_2.5.7.css">
    <script type="text/javascript" src="../../../../lib/loading/okLoading.js"></script>
    <link rel="stylesheet" href="../../../../css/bootstrap.css">
    <link rel="stylesheet" href="../../../../lib/layui/css/layui_2.5.7.css">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .layui-table-page select {
            height: 22px;
        }

        /* layui-table 表格内容允许换行 */
        .layui-table-cell {
            height: auto;
        }

        .layui-btn+.layui-btn {
            margin-left: 0px !important;
        }

    </style>
</head>

<body>

    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a><cite>首页</cite></a>
            <a><cite>工程业务</cite></a>
            <a><cite>合同信息</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
           href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon"
                                                                            style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body" id="app" >
        <div class="row">
            <div class="col-xs-6 col-sm-4 col-md-3">
                <section class="panel">
                    <div class="symbol bgcolor-blue"><i class=" iconfont icon-dashaxiaoqudizhi01"></i>
                    </div>
                    <div class="value tab-menu" bind="1">
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="收款总额（元）"><i
                                class="iconfont " data-icon=""></i>
                            <h1>{{statistics.collectionTotalAmount == null ? 0 : statistics.collectionTotalAmount}}</h1>
                        </a>
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="收款总额（元）"> <i
                                class="iconfont " data-icon=""></i><span>收款总额（元）</span></a>
                    </div>
                </section>
            </div>

            <div class="col-xs-6 col-sm-4 col-md-3">
                <section class="panel">
                    <div class="symbol bgcolor-commred"><i class="iconfont icon-dashaxiaoqudizhi01"></i>
                    </div>
                    <div class="value tab-menu" bind="1">
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="收款合同（个）"> <i
                                class="iconfont " data-icon=""></i>
                            <h1>{{statistics.collectionContract == null ? 0 : statistics.collectionContract}}</h1>
                        </a>
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="收款合同（个）"> <i
                                class="iconfont " data-icon=""></i><span>收款合同（个）</span></a>
                    </div>
                </section>
            </div>

            <div class="col-xs-6 col-sm-4 col-md-3">
                <section class="panel">
                    <div class="symbol bgcolor-yellow-green"><i class="iconfont icon-dashaxiaoqudizhi01"></i>
                    </div>
                    <div class="value tab-menu" bind="1">
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="付款总额（元）"> <i
                                class="iconfont " data-icon=""></i>
                            <h1>{{statistics.paymentTotalAmount == null ? 0 : statistics.paymentTotalAmount}}</h1>
                        </a>
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="付款总额（元）"> <i
                                class="iconfont " data-icon=""></i><span>付款总额（元）</span></a>
                    </div>
                </section>
            </div>
            <div class="col-xs-6 col-sm-4 col-md-3">
                <section class="panel">
                    <div class="symbol bgcolor-dark-green"><i class="iconfont icon-dashaxiaoqudizhi01"></i>
                    </div>
                    <div class="value tab-menu" bind="1">
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="付款合同（个）"> <i
                                class="iconfont " data-icon=""></i>
                            <h1>{{statistics.paymentContract == null ? 0 : statistics.paymentContract}}</h1>
                        </a>
                        <a href="javascript:;" data-url="user-info.html" data-parent="true" data-title="付款合同（个）"> <i
                                class="iconfont " data-icon=""></i><span>付款合同（个）</span></a>
                    </div>
                </section>
            </div>

        </div>

        <div class="main_box">
            <div class="panel-heading">
                <ul class="nav nav-tabs" id="navTabs">
                    <li class="active"><a class="totalPane" data-tab="" href="contract_list.html">合同列表</a></li>
                    <li class=""><a class="collectionPane" data-tab="" href="collection_contract_list.html">收款合同</a></li>
                    <li class=""><a class="paymentPane" data-tab="" href="payment_contract_list.html">付款合同</a></li>
                    <li style="float: right;width: 162px" class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                        aria-expanded="false">添加合同<span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="javascript:void(0)" onclick="admin_add('添加收款合同','collection_contract_add.html')">添加收款合同</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="javascript:void(0)" onclick="admin_add('添加付款合同','payment_contract_add.html')">添加付款合同</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>

        <form class="layui-form x-center">
            <div class="layui-form-pane" style="margin-top: 5px;">
                <div class="layui-form-item" style="padding-left: 3%">
                    <label class="layui-form-label">合同性质</label>
                    <div class="layui-input-inline">
                        <select name="contractNature" lay-search="">
                            <option value="">选择合同性质</option>
                            <option value="1">收款合同</option>
                            <option value="2">付款合同</option>
                        </select>
                    </div>

<!--                    <label class="layui-form-label">合同类型</label>-->
<!--                    <div class="layui-input-inline">-->
<!--                        <select name="contractType" lay-search="">-->
<!--                            <option value="">选择合同类型</option>-->
<!--                            <option value="1">销售合同</option>-->
<!--                            <option value="2">工程合同</option>-->
<!--                        </select>-->
<!--                    </div>-->

                    <label class="layui-form-label">客户名称</label>
                    <div class="layui-input-inline">
                        <select name="customerId" lay-search="" id="customerId">
                            <option value="">选择客户</option>
                        </select>
                    </div>

                    <label class="layui-form-label">项目名称</label>
                    <div class="layui-input-inline">
                        <select name="projectId" id="projectId" lay-search="">
                            <option value="">选择项目</option>
                        </select>
                    </div>

                    <label class="layui-form-label">强制终结</label>
                    <div class="layui-input-inline">
                        <select name="delFlag" lay-search="">
                            <option value="">全部</option>
                            <option value="0">否</option>
                            <option value="-1">是</option>
                        </select>
                    </div>
                    <hr>
                    <label class="layui-form-label">合同编号</label>
                    <div class="layui-input-inline">
                        <input  autocomplete="off"  type="text" class="layui-input" name="contractNum" placeholder="请输入合同编号">
                    </div>
                    <label class="layui-form-label">签订时间</label>
                    <div class="layui-input-inline">
                        <input  autocomplete="off"  class="layui-input" placeholder="签订开始日" name="signStart" id="signStart">
                    </div>
                    <div class="layui-input-inline">
                        <input  autocomplete="off"  class="layui-input" placeholder="签订截止日" name="signEnd" id="signEnd">
                    </div>

                    <label class="layui-form-label">添加时间</label>
                    <div class="layui-input-inline">
                        <input  autocomplete="off"  class="layui-input" placeholder="添加开始日" name="createStart" id="createStart">
                    </div>
                    <div class="layui-input-inline">
                        <input  autocomplete="off"  class="layui-input" placeholder="添加截止日" name="createEnd" id="createEnd">
                    </div>
                    <div class="layui-input-inline layui-show-xs-block">
                        <!-- <button class="layui-btn" type="button" lay-filter="sreach" data-type="reload"
                                onclick="reload()">
                            <i class="layui-icon">&#xe615;</i></button> -->
                        <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>搜索</button>
                        <button type="reset" class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe666;</i>重置</button>
                    </div>

                </div>
            </div>
        </form>


        <div class="layui-card-body" >
            <h5 class="red_color">
                收款总额：{{statistics.collectionTotalAmount == null ? 0 : statistics.collectionTotalAmount}} 元，
                已收金额：{{statistics.collectionHappenAmount == null ? 0 : statistics.collectionHappenAmount}} 元，
                未收金额：{{statistics.collectionNoHappenAmount == null ? 0 : statistics.collectionNoHappenAmount}} 元
                <!--，
                已开票金额：{{statistics.collectionInvoiceAmount == null ? 0 : statistics.collectionInvoiceAmount}} 元-->。</h5>
            <h5 class="red_color">
                付款总额：{{statistics.paymentTotalAmount == null ? 0 : statistics.paymentTotalAmount}} 元，
                已付金额：{{statistics.paymentHappenAmount == null ? 0 : statistics.paymentHappenAmount}} 元，
                未付金额：{{statistics.paymentNoHappenAmount == null ? 0 : statistics.paymentNoHappenAmount}} 元
                <!--，
                已开票金额：{{statistics.paymentInvoiceAmount == null ? 0 : statistics.paymentInvoiceAmount}} 元-->。</h5>
            <table class="layui-table" id="test" lay-filter="test">
            </table>
        </div>
    </div>
</body>

<script type="text/html" id="barDemo">
    {{#  if(d.delFlag === 0){ }}
        <a title="附件" lay-event="file_list" class="ml-5 layui-btn-xs layui-btn layui-btn-normal" style="background-color: #1E9FFF">附件</a>
        <a title="电梯" lay-event="elevator_list" class="ml-5 layui-btn-xs layui-btn" style="background-color: #01AAED">电梯</a>
    {{#  } }}
    <a title="详情" lay-event="view" class="ml-5 layui-btn-xs layui-btn layui-btn-normal" style="background-color: #009688">详情</a>
    {{#  if(d.delFlag === 0){ }}
        <a title="编辑" lay-event="edit" class="ml-5 layui-btn-xs layui-btn" style="background-color: #5FB878">编辑</a>
        <a title="终结" lay-event="endContract" class="ml-5 layui-btn-xs layui-btn layui-btn-warm" >终结</a>
    {{#  } }}
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>


<script type="text/javascript" src="../../../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../../../js/myAjax.js"></script>
<script type="text/javascript" src="../../../../js/pub.js"></script>
<script type="text/javascript" src="../../../../lib/layui/layui2.5.7.js"></script>
<script type="text/javascript" src="../../../../js/vue.min.js"></script>
<!-- <script src="lib/layui/layui.js" charset="utf-8"></script> -->
<script src="../../../../js/x-layui.js" charset="utf-8"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>


<script>

    layui.use(['table','laydate', 'element', 'laypage', 'layer', 'form', 'laytpl'], function () {
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        element = layui.element;//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        laytpl = layui.laytpl;
        var table = layui.table;
        var form = layui.form;
        okLoading.close($);
        getCustomer();
        getProject();

        //执行一个laydate实例
        laydate.render({
            trigger: 'click',
            type: 'date',
            elem: '#signStart' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            trigger: 'click',
            type: 'date',
            elem: '#signEnd' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
            trigger: 'click',
            type: 'datetime',
            elem: '#createStart' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            trigger: 'click',
            type: 'datetime',
            elem: '#createEnd' //指定元素
        });
        //方法级渲染
        var t1 = table.render({
            elem: '#test',
            url: $baseUrl + 'xa/contractInfo/findListByPage',
            where: {
                userId: $userId,
                // delFlag: 0
                contractType: 2,
            },
            headers: {
                token: $token
            }
            , toolbar: '#toolbarDemo',

            // toolbar: true,
            cols: [
                [
                    {
                        title: '序号',
                        type:'numbers',
                        width: '4%',
                        fixed: 'left',
                    },
                    {
                        field: 'contractNature',
                        title: '性质',
                        width: 65,
                        fixed: 'left',
                        templet(item) {
                            if (item.contractNature === 1) {
                                return '<button type="button" class="layui-btn layui-btn-xs layui-btn layui-btn-xs layui-btn-radius layui-btn">收款</button>';
                            } else if (item.contractNature === 2) {
                                return '<button type="button" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-warm">付款</button>';
                            }else {
                                return '<button type="button" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-danger">未知</button>';
                            }

                        }
                    },
                    {
                        field: 'contractType',
                        title: '合同类型',
                        fixed: 'left',
                        width: 90,
                        templet(item) {
                            if (item.contractType === 1) {
                                return '<span>销售合同</span>';
                            } else {
                                return '<span>工程合同</span>';
                            }

                        }
                    },
                    {
                        // field: 'revenueAndExpenditureChannels',
                        title: ' 关联项目及客户',
                        width: 190,
                        align: 'center',
                        templet(item) {
                            return '<span style="font-weight:bold">'+item.projectName+'</span><br><span>'+item.customerName+'</span>';

                        }
                    },
                    {
                        field: 'contractTotalAmount',
                        title: '合同总额/元',
                        width: 150,
                        align: 'center',
                        sort: true
                    },
                    {
                        field: 'contractHappenAmount',
                        title: '已发生额/元',
                        align: 'center',
                        width: 150,
                        sort: true
                    },
                    {
                        field: 'contractNoHappenAmount',
                        title: '未发生额/元',
                        align: 'center',
                        width: 150,
                        sort: true
                    },


                    /*{
                        field: 'contractInvoiceAmount',
                        title: '发票金额/元',
                        align: 'center',
                        sort: true
                    },
*/
                    {
                        field: 'signTime',
                        title: '签订日期',
                        align: 'center',
                        width: 180,
                        sort: true
                    },
                    {
                        field: 'elevatorNum',
                        title: '电梯总量/台',
                        width: 110,
                        align: 'center',
                    },
                    {
                        field: 'delFlag',
                        title: '强制终结',
                        align: 'center',
                        width: '6%',
                        templet(item) {
                            if (item.delFlag === 0) {
                                return '<button type="button" class="layui-btn layui-btn-xs layui-btn layui-btn-xs layui-btn-radius layui-btn-primary">否</button>';
                            } else {
                                return '<button type="button" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-warm">是</button>';
                            }

                        }
                    },
                    {
                        field: 'createTime',
                        title: '增加时间',
                        width: 180,
                        align: 'center',
                        sort: true
                    },
                    {
                        // field: 'status',
                        title: '操作',
                        templet: '#barDemo',
                        width: 255,
                        fixed: 'right',
                        align: 'center',

                    }]
            ],
            request: {
                pageName: 'pageNum', //页码的参数名称，默认：page
                limitName: 'pageSize',
            },
            response: {
                statusName: 'code' //规定数据状态的字段名称，默认：code
                ,
                statusCode: 0 //规定成功的状态码，默认：0
                ,
                msgName: 'msg' //规定状态信息的字段名称，默认：msg
                ,
                countName: 'total' //规定数据总数的字段名称，默认：count
                ,
                dataName: 'data', //规定数据列表的字段名称，默认：data
            },
            id: 'test',
            page: true,
            height: 'auto',
            even: true,
            done: function (res, curr, count) {
                //是否有权限或权限是否失效
                // authorizeState();
                // this.statisticsFun();
                //解决操作栏因为内容过多换行问题
                $(".layui-table-main tr").each(function (index, val) {
                    $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
                    $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
                });

            }
        });

        form.on('submit(sreach)', function(data) {
            var contractNature = data.field.contractNature;
            var contractType = data.field.contractType;
            var customerId = data.field.customerId;
            var projectId = data.field.projectId;
            
            var delFlag = data.field.delFlag;
            var contractNum = data.field.contractNum;
            var signStart = data.field.signStart;
            var signEnd = data.field.signEnd;
            var createStart = data.field.createStart;
            var createEnd = data.field.createEnd;

            table.reload('test', {
                where: { //设定异步数据接口的额外参数，任意设
                    contractNature: contractNature,
                    contractType: contractType,
                    customerId: customerId,
                    projectId: projectId,
                    delFlag:delFlag,
                    contractNum: contractNum,
                    startSignTime: signStart,
                    endSignTime: signEnd,
                    startCreateTime: createStart,
                    endCreateTime: createEnd
                },
            });
            return false;
        })

        //监听工具条
        table.on('tool(test)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            let data = obj.data; //获得当前行数据
            let layEvent = obj.event; //获得 lay-event 对应的值（也可以是表头的 event 参数对应的值）
            if (layEvent === 'del') { //删除
                layer.confirm('是否确认删除 ？', {
                    icon: 3,
                    title: '提示'
                }, function (index) {
                    let request = {
                        url: "xa/contractInfo/delContractInfo/" + data.id,
                        data: {
                            userId: $userId,
                        },
                        method: "DELETE",
                    };
                    sendRequest(request, (data) => {
                        if (data.code === 0) {
                            layer.msg("删除成功", {
                                icon: 1
                            });
                            t1.reload();
                        } else {
                            layer.msg("删除失败，请稍后再试！", {
                                icon: 5
                            });
                        }
                    });
                    layer.close(index);
                });
            } else if (layEvent === 'view') { //详情
                if (data.contractNature === 1) {
                    admin_add('收款合同详情', 'collection_contract_detail.html?contractId=' + data.id)
                }else if (data.contractNature === 2){
                    admin_add('付款合同详情', 'payment_contract_detail.html?contractId=' + data.id)
                }
                
                
            } else if (layEvent === 'edit') { //编辑
                if (data.delFlag === -1) {
                    layer.msg("合同已终结，不能编辑！", {
                        icon: 7
                    });
                } else {
                    if (data.contractNature === 1) {
                        admin_add('编辑收款合同', 'collection_contract_edit.html?contractId=' + data.id)
                    } else if (data.contractNature === 2) {
                        admin_add('编辑付款合同', 'payment_contract_edit.html?contractId=' + data.id)
                    }
                }

            } else if (layEvent === 'file_list') { //附件列表
                if (data.delFlag === -1) {
                    layer.msg("合同已终结，不能上传附件！", {
                        icon: 7
                    });
                } else {
                    admin_add('合同附件信息', 'contract_file_list.html?contractId=' + data.id)
                }

            } else if (layEvent === 'elevator_list') { //电梯列表
                if (data.delFlag === -1) {
                    layer.msg("合同已终结，不能添加电梯！", {
                        icon: 7
                    });
                } else {
                    admin_add('合同电梯信息', 'contract_elevator_list.html?contractId=' + data.id ,1200)
                }

            } else if (layEvent === 'endContract') { //终结合同
                if (data.delFlag === -1) {
                    layer.msg("合同已终结，不能重复操作！", {
                        icon: 7
                    });
                } else {
                    admin_add('合同强制终结', 'contract_end.html?contractId=' + data.id)
                }

            }
        });

    });

    function getCustomer(){
        $.ajax({
        	type:"get",
            url:baseHead + "xa/customer/list",
            headers: {
                "token": $token,
            },
            data:{
                userId :$userId
            },
            success:function(res){
               	if(res.code === 0){
                    for(var i =0;i < res.data.length;i++){
                        $("#customerId").append("<option value=\""+res.data[i].id+"\">"+res.data[i].name+"</option>");
                    }
                    //重新渲染
                    layui.form.render("select");
                }else{
                    layer.msg(res.message);
                }
            }
        });
    }

    function getProject(){
        // document.getElementById("projectId").innerHTML = "";
        $.ajax({
        	type:"get",
            url:baseHead + "xa/project/list",
            headers: {
                "token": $token,
            },
            data:{
                userId :$userId
            },
            success:function(res){
               	if(res.code == 0){
                    // $("#projectId").append("<option value=''>请选择关联项目</option>");
                    for(var i =0;i < res.data.length;i++){
                        $("#projectId").append("<option value=\""+res.data[i].id+"\">"+res.data[i].name+"</option>");
                    }
                    //重新渲染
                    layui.form.render("select");
                }else{
                    layer.msg(res.message);
                }
            }
        });
    };

    function reload(value) {
        table.reload('test', {
            where: {
                // name: $("input[name=name]").val(),
                // taxpayerIdentificationNumber: $("input[name=taxpayerIdentificationNumber]").val(),
                // addressAndTelephoneNumber: $("input[name=addressAndTelephoneNumber]").val(),
                // billType: $("select[name=billType]").val(),
                // start: $("input[name=start]").val(),
                // end: $("input[name=end]").val(),
            }
        });
    }

    function admin_add(title, url, w, h) {
        x_admin_show(title, url, w, h);
    }
</script>

<script>

    var vm = new Vue({
        el: "#app",
        data: {
            statistics: {
                collectionTotalAmount: null,
                collectionHappenAmount: null,
                collectionNoHappenAmount: null,
                collectionInvoiceAmount: null,
                collectionContract: null,
                paymentTotalAmount: null,
                paymentHappenAmount: null,
                paymentNoHappenAmount: null,
                paymentInvoiceAmount: null,
                paymentContract: null,
            }
            // statistics: {
            //     collectionContract: null,
            //     paymentContract: null,
            //     totalCollection: {

            //     },
            //     totalPayment: {

            //     }
            // }
        },
        mounted() {
            this.statisticsFun();
        },
        methods: {
            statisticsFun() {
                let request = {
                    url: 'xa/contractInfo/findDataStatisticalByContractType',
                    data: {
                        userId: $userId,
                        contractType:2
                    },
                    method: "GET",
                };
                sendRequest(request, (res) => {
                    // this.statistics = res.data
                    this.statistics.collectionTotalAmount = res.data.totalCollection.contract_total_amount,
                    this.statistics.collectionHappenAmount = res.data.totalCollection.contract_happen_amount,
                    this.statistics.collectionNoHappenAmount = res.data.totalCollection.contract_no_happen_amount,
                    this.statistics.collectionInvoiceAmount = res.data.totalCollection.contract_invoice_amount,
                    this.statistics.collectionContract = res.data.collectionContract,
                    this.statistics.paymentTotalAmount = res.data.totalPayment.contract_total_amount,
                    this.statistics.paymentHappenAmount = res.data.totalPayment.contract_happen_amount,
                    this.statistics.paymentNoHappenAmount = res.data.totalPayment.contract_no_happen_amount,
                    this.statistics.paymentInvoiceAmount = res.data.totalPayment.contract_invoice_amount,
                    this.statistics.paymentContract = res.data.paymentContract
                });
            }
        }

    });


    // setTimeout(() => {
    //     //修改状态
    //     let form = layui.form;
    //     //查发票类型
    //     let request = {
    //         url: 'dictionary/findDataDictionaryValue',
    //         data: {
    //             userId: $userId,
    //             label: 'INVOICE_TYPE'
    //         },
    //         method: "POST",
    //     };
    //     sendRequest(request, (res) => {
    //         console.log(res);
    //         let billType = res.data;
    //         $.each(billType, function (index, item) {
    //             let opt = $("<option value=" + item + ">" + item + "</option>");
    //             $("select[name=billType]").append(opt);
    //             console.log(opt)

    //         });


    //         form.render('select');
    //     });
    // }, 300)
</script>

</html>
